<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui, viewport-fit=cover">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <title>My App</title>
    <link rel="stylesheet" href="../../packages/core/css/framework7.min.css">
    <link rel="stylesheet" href="../../css/framework7-icons.css">
  </head>
  <body>
    <div id="app"></div>
    <script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
    <script src="https://unpkg.com/react@16.4.1/umd/react.production.min.js"></script>
    <script src="https://unpkg.com/react-dom@16.4.1/umd/react-dom.production.min.js"></script>
    <script src="../../packages/react/framework7-react.min.js"></script>
    <script src="../../packages/core/js/framework7.min.js"></script>
    <script type="text/babel">
      class AppComponent extends React.Component {
        constructor() {
          super();
      
          this.state = {
      
          };
        }
        render() {
          return (
            <App>
              <View main>
                <Page>
                  <Navbar title="Form Inputs"></Navbar>
                  <BlockTitle>Full Layout / Inline Labels</BlockTitle>
                  <List inlineLabels noHairlinesMd>
                    <ListInput
                      label="Name"
                      type="text"
                      placeholder="Your name"
                      clearButton
                    >
                      <Icon icon="demo-list-icon" slot="media"/>
                    </ListInput>
      
                    <ListInput
                      label="Password"
                      type="password"
                      placeholder="Your password"
                      clearButton
                    >
                      <Icon icon="demo-list-icon" slot="media"/>
                    </ListInput>
      
                    <ListInput
                      label="E-mail"
                      type="email"
                      placeholder="Your e-mail"
                      clearButton
                    >
                      <Icon icon="demo-list-icon" slot="media"/>
                    </ListInput>
      
                    <ListInput
                      label="URL"
                      type="url"
                      placeholder="URL"
                      clearButton
                    >
                      <Icon icon="demo-list-icon" slot="media"/>
                    </ListInput>
      
                    <ListInput
                      label="Phone"
                      type="tel"
                      placeholder="Your phone number"
                      clearButton
                    >
                      <Icon icon="demo-list-icon" slot="media"/>
                    </ListInput>
      
                    <ListInput
                      label="Gender"
                      type="select"
                      defaultValue="Male"
                      placeholder="Please choose..."
                    >
                      <Icon icon="demo-list-icon" slot="media"/>
                      <option value="Male">Male</option>
                      <option value="Female">Female</option>
                    </ListInput>
      
                    <ListInput
                      label="Birthday"
                      type="date"
                      defaultValue="2014-04-30"
                      placeholder="Please choose..."
                    >
                      <Icon icon="demo-list-icon" slot="media"/>
                    </ListInput>
      
                    <ListInput
                      label="Date time"
                      type="datetime-local"
                      placeholder="Please choose..."
                    >
                      <Icon icon="demo-list-icon" slot="media"/>
                    </ListInput>
      
                    <ListInput
                      label="Range"
                      input={false}
                    >
                      <Icon icon="demo-list-icon" slot="media"/>
                      <Range slot="input" value={50} min={0} max={100} step={1}/>
                    </ListInput>
      
                    <ListInput
                      label="Textarea"
                      type="textarea"
                      placeholder="Bio"
                    >
                      <Icon icon="demo-list-icon" slot="media"/>
                    </ListInput>
      
                    <ListInput
                      label="Resizable"
                      type="textarea"
                      resizable
                      placeholder="Bio"
                    >
                      <Icon icon="demo-list-icon" slot="media"/>
                    </ListInput>
      
                  </List>
      
                  <BlockTitle>Full Layout / Stacked Labels</BlockTitle>
                  <List noHairlinesMd>
                    <ListInput
                      label="Name"
                      type="text"
                      placeholder="Your name"
                      clearButton
                    >
                      <Icon icon="demo-list-icon" slot="media"/>
                    </ListInput>
      
                    <ListInput
                      label="Password"
                      type="password"
                      placeholder="Your password"
                      clearButton
                    >
                      <Icon icon="demo-list-icon" slot="media"/>
                    </ListInput>
      
                    <ListInput
                      label="E-mail"
                      type="email"
                      placeholder="Your e-mail"
                      clearButton
                    >
                      <Icon icon="demo-list-icon" slot="media"/>
                    </ListInput>
      
                    <ListInput
                      label="URL"
                      type="url"
                      placeholder="URL"
                      clearButton
                    >
                      <Icon icon="demo-list-icon" slot="media"/>
                    </ListInput>
      
                    <ListInput
                      label="Phone"
                      type="tel"
                      placeholder="Your phone number"
                      clearButton
                    >
                      <Icon icon="demo-list-icon" slot="media"/>
                    </ListInput>
      
                    <ListInput
                      label="Gender"
                      type="select"
                      defaultValue="Male"
                      placeholder="Please choose..."
                    >
                      <Icon icon="demo-list-icon" slot="media"/>
                      <option value="Male">Male</option>
                      <option value="Female">Female</option>
                    </ListInput>
      
                    <ListInput
                      label="Birthday"
                      type="date"
                      defaultValue="2014-04-30"
                      placeholder="Please choose..."
                    >
                      <Icon icon="demo-list-icon" slot="media"/>
                    </ListInput>
      
                    <ListInput
                      label="Date time"
                      type="datetime-local"
                      placeholder="Please choose..."
                    >
                      <Icon icon="demo-list-icon" slot="media"/>
                    </ListInput>
      
                    <ListInput
                      label="Range"
                      input={false}
                    >
                      <Icon icon="demo-list-icon" slot="media"/>
                      <Range slot="input" value={50} min={0} max={100} step={1}/>
                    </ListInput>
      
                    <ListInput
                      label="Textarea"
                      type="textarea"
                      placeholder="Bio"
                    >
                      <Icon icon="demo-list-icon" slot="media"/>
                    </ListInput>
      
                    <ListInput
                      label="Resizable"
                      type="textarea"
                      resizable
                      placeholder="Bio"
                    >
                      <Icon icon="demo-list-icon" slot="media"/>
                    </ListInput>
                  </List>
      
                  <BlockTitle>Floating Labels (MD-theme only)</BlockTitle>
                  <List noHairlinesMd>
                    <ListInput
                      label="Name"
                      floatingLabel
                      type="text"
                      placeholder="Your name"
                      clearButton
                    >
                      <Icon icon="demo-list-icon" slot="media"/>
                    </ListInput>
      
                    <ListInput
                      label="Password"
                      floatingLabel
                      type="password"
                      placeholder="Your password"
                      clearButton
                    >
                      <Icon icon="demo-list-icon" slot="media"/>
                    </ListInput>
      
                    <ListInput
                      label="E-mail"
                      floatingLabel
                      type="email"
                      placeholder="Your e-mail"
                      clearButton
                    >
                      <Icon icon="demo-list-icon" slot="media"/>
                    </ListInput>
      
                    <ListInput
                      label="URL"
                      floatingLabel
                      type="url"
                      placeholder="URL"
                      clearButton
                    >
                      <Icon icon="demo-list-icon" slot="media"/>
                    </ListInput>
      
                    <ListInput
                      label="Phone"
                      floatingLabel
                      type="tel"
                      placeholder="Your phone number"
                      clearButton
                    >
                      <Icon icon="demo-list-icon" slot="media"/>
                    </ListInput>
      
                    <ListInput
                      label="Resizable"
                      floatingLabel
                      type="textarea"
                      resizable
                      placeholder="Bio"
                    >
                      <Icon icon="demo-list-icon" slot="media"/>
                    </ListInput>
                  </List>
      
                  <BlockTitle>Validation + Additional Info</BlockTitle>
                  <List noHairlinesMd>
                    <ListInput
                      label="Name"
                      type="text"
                      placeholder="Your name"
                      info="Default validation"
                      required
                      validate
                      clearButton
                    >
                      <Icon icon="demo-list-icon" slot="media"/>
                    </ListInput>
      
                    <ListInput
                      label="Fruit"
                      type="text"
                      placeholder="Type 'apple' or 'banana'"
                      required
                      validate
                      pattern="apple|banana"
                      clearButton
                    >
                      <Icon icon="demo-list-icon" slot="media"/>
                      <span slot="info">Pattern validation (<b>apple|banana</b>)</span>
                    </ListInput>
      
                    <ListInput
                      label="E-mail"
                      type="email"
                      placeholder="Your e-mail"
                      info="Default e-mail validation"
                      required
                      validate
                      clearButton
                    >
                      <Icon icon="demo-list-icon" slot="media"/>
                    </ListInput>
      
                    <ListInput
                      label="URL"
                      type="url"
                      placeholder="Your URL"
                      info="Default URL validation"
                      required
                      validate
                      clearButton
                    >
                      <Icon icon="demo-list-icon" slot="media"/>
                    </ListInput>
      
                    <ListInput
                      label="Number"
                      type="text"
                      placeholder="Enter number"
                      info="With custom error message"
                      errorMessage="Only numbers please!"
                      required
                      validate
                      pattern="[0-9]*"
                      clearButton
                    >
                      <Icon icon="demo-list-icon" slot="media"/>
                    </ListInput>
      
                  </List>
      
                  <BlockTitle>Icon + Input</BlockTitle>
                  <List noHairlinesMd>
                    <ListInput
                      type="text"
                      placeholder="Your name"
                      clearButton
                    >
                      <Icon icon="demo-list-icon" slot="media"/>
                    </ListInput>
      
                    <ListInput
                      type="password"
                      placeholder="Your password"
                      clearButton
                    >
                      <Icon icon="demo-list-icon" slot="media"/>
                    </ListInput>
      
                    <ListInput
                      type="email"
                      placeholder="Your e-mail"
                      clearButton
                    >
                      <Icon icon="demo-list-icon" slot="media"/>
                    </ListInput>
      
                    <ListInput
                      type="url"
                      placeholder="URL"
                      clearButton
                    >
                      <Icon icon="demo-list-icon" slot="media"/>
                    </ListInput>
      
                  </List>
      
                  <BlockTitle>Label + Input</BlockTitle>
                  <List noHairlinesMd>
                    <ListInput
                      label="Name"
                      type="text"
                      placeholder="Your name"
                      clearButton
                    />
      
                    <ListInput
                      label="Password"
                      type="password"
                      placeholder="Your password"
                      clearButton
                    />
      
                    <ListInput
                      label="E-mail"
                      type="email"
                      placeholder="Your e-mail"
                      clearButton
                    />
      
                    <ListInput
                      label="URL"
                      type="url"
                      placeholder="URL"
                      clearButton
                    />
                  </List>
      
                  <BlockTitle>Only Inputs</BlockTitle>
                  <List noHairlinesMd>
                    <ListInput
                      type="text"
                      placeholder="Your name"
                      clearButton
                    />
      
                    <ListInput
                      type="password"
                      placeholder="Your password"
                      clearButton
                    />
      
                    <ListInput
                      type="email"
                      placeholder="Your e-mail"
                      clearButton
                    />
      
                    <ListInput
                      type="url"
                      placeholder="URL"
                      clearButton
                    />
                  </List>
      
                  <BlockTitle>Inputs + Additional Info</BlockTitle>
                  <List noHairlinesMd>
                    <ListInput
                      type="text"
                      placeholder="Your name"
                      info="Full name please"
                      clearButton
                    />
      
                    <ListInput
                      type="password"
                      placeholder="Your password"
                      info="8 characters minimum"
                      clearButton
                    />
      
                    <ListInput
                      type="email"
                      placeholder="Your e-mail"
                      info="Your work e-mail address"
                      clearButton
                    />
      
                    <ListInput
                      type="url"
                      placeholder="URL"
                      info="Your website URL"
                      clearButton
                    />
                  </List>
      
                  <BlockTitle>Only Inputs Inset</BlockTitle>
                  <List inset>
                    <ListInput
                      type="text"
                      placeholder="Your name"
                      clearButton
                    />
      
                    <ListInput
                      type="password"
                      placeholder="Your password"
                      clearButton
                    />
      
                    <ListInput
                      type="email"
                      placeholder="Your e-mail"
                      clearButton
                    />
      
                    <ListInput
                      type="url"
                      placeholder="URL"
                      clearButton
                    />
                  </List>
                </Page>
              </View>
            </App>
          )
        }
      }
    </script>
    <style>
      .demo-list-icon {
        background: #ccc;
        display: block;
        position: relative;
      }
      .ios .demo-list-icon, .ios .icon-f7, .ios .icon-vi {
        width: 29px;
        height: 29px;
        border-radius: 6px;
        box-sizing: border-box;
      }
      .md .demo-list-icon, .md .icon-f7, .md .icon-vi {
        width: 24px;
        height: 24px;
        border-radius: 4px;
      }
    </style>
    <script>
      var theme = 'ios';
      if (location.href.indexOf('theme=md') >= 0) theme = 'md';
      
      if (Framework7.use) Framework7.use(Framework7React, { theme: theme });
      else if (Framework7.Class && Framework7.Class.use) Framework7.Class.use(Framework7React, { theme: theme });
      
      var plugin = {
        params: {
          theme: theme,
        }
      };
      
      if (Framework7.use) Framework7.use(plugin);
      else if (Framework7.Class && Framework7.Class.use) Framework7.Class.use(plugin);
      
      window.onload = function () {
        if (typeof AppComponent !== 'undefined') {
          ReactDOM.render(
            React.createElement(AppComponent),
            document.getElementById('app')
          );
        }
      }
    </script>
  </body>
</html>